3.515 \(\int \cos ^3(c+d x) (a+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=44 \[ -\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d}-\frac{b \cos ^3(c+d x)}{3 d} \]

[Out]

-(b*Cos[c + d*x]^3)/(3*d) + (a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0315729, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3486, 2633} \[ -\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d}-\frac{b \cos ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Tan[c + d*x]),x]

[Out]

-(b*Cos[c + d*x]^3)/(3*d) + (a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d)

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin{align*} \int \cos ^3(c+d x) (a+b \tan (c+d x)) \, dx &=-\frac{b \cos ^3(c+d x)}{3 d}+a \int \cos ^3(c+d x) \, dx\\ &=-\frac{b \cos ^3(c+d x)}{3 d}-\frac{a \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=-\frac{b \cos ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d}-\frac{a \sin ^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.012072, size = 44, normalized size = 1. \[ -\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d}-\frac{b \cos ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Tan[c + d*x]),x]

[Out]

-(b*Cos[c + d*x]^3)/(3*d) + (a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 36, normalized size = 0.8 \begin{align*}{\frac{1}{d} \left ( -{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{3}b}{3}}+{\frac{a \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*tan(d*x+c)),x)

[Out]

1/d*(-1/3*cos(d*x+c)^3*b+1/3*a*(2+cos(d*x+c)^2)*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.75519, size = 47, normalized size = 1.07 \begin{align*} -\frac{b \cos \left (d x + c\right )^{3} +{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

-1/3*(b*cos(d*x + c)^3 + (sin(d*x + c)^3 - 3*sin(d*x + c))*a)/d

________________________________________________________________________________________

Fricas [A]  time = 1.7645, size = 90, normalized size = 2.05 \begin{align*} -\frac{b \cos \left (d x + c\right )^{3} -{\left (a \cos \left (d x + c\right )^{2} + 2 \, a\right )} \sin \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/3*(b*cos(d*x + c)^3 - (a*cos(d*x + c)^2 + 2*a)*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*cos(c + d*x)**3, x)

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError